home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / bindings / fun / append next >
Encoding:
Text File  |  1996-09-27  |  1.1 KB  |  41 lines

  1. ;OCL{{{}}}
  2. ;OCL{{{  comments
  3. ; append the current line to the previous line and delete all spaces
  4. ; between the lines. Calling this when one of the lines isn't a text-line
  5. ; stops the macro with errormessage ``oops''.
  6. ;OCL}}}
  7. @if-using not(ocl-file-append)
  8.   @use (ocl-file-append)
  9.   ;OCL{{{  reference description
  10.   @if-using ( FUN-REFERENCE ) ; 1 ;
  11.   Define a function, to join the current line and the line above.
  12.   @fi
  13.   ;OCL}}}
  14.   ;OCL{{{  libs
  15.   @if-using not(ocl-file-error)     @lib error     @fi
  16.   @if-using not(ocl-file-delspaces) @lib delspaces @fi
  17.   ;OCL}}}
  18.   ;OCL{{{  append-to-previous-line
  19.   ;OCL{{{  reference
  20.   @if-using ( FUN-REFERENCE ) ; 2 ; append-to-previous-line-ref
  21.   ;OCL{{{  @append append-to-previous-line
  22.   Join the current and the previous line.
  23.   ;OCL}}}
  24.   @fi
  25.   ;OCL}}}
  26.   ( deffun append-to-previous-line
  27.      ( if not(in-prompt)
  28.         ( previous-line
  29.           end-of-line
  30.           if last-message M_ERR_PO () fi
  31.           delete-character
  32.           if not(last-message M_ERR_PO)
  33.            ( delspaces )
  34.           fi
  35.         )
  36.        fi
  37.      )
  38.   )
  39.   ;OCL}}}
  40. @fi
  41.